<?php
class LanguageSelector extends CWidget
{
    public function run()
    {
        $languages = Array();
        $all_lang = Language::allLang();
        foreach ($all_lang as $value) { $languages[$value['l']] = $value['name'] ; }
        $currentLang = Yii::app()->language;
        $this->render('languageSelector', array('currentLang' => $currentLang, 'languages'=>$languages));
    }
}
?>